Slicenet v0.8

Changes & Highlights

Big themes in Slicenet v0.8

  • YAML based experiment topology & traffic creation
  • Out of box traffic pattern options
  • CSV based inference for insightful reports
  • Automation of slicelets

Deep Dive

YAML File - Experiment Metadata

name: "config1-example"
description: "description"
delay_pattern : "exponential" 
delay_pattern_threshold : 2 
epoch: 1

Name & Description of this experiment

YAML File - Traffic metadata

name: "config1-example"
description: "description"
delay_pattern : "exponential" 
delay_pattern_threshold : 2 
epoch: 1

Traffic delay pattern for the incoming slicelets.

It takes 3 values :

  • default
  • exponential
  • uniform

YAML File - Training metadata

name: "config1-example"
description: "description"
delay_pattern : "exponential" 
delay_pattern_threshold : 2 
epoch: 1

Training epoch count

  • It takes any non-negative value and make slicenet to repeat this experiment for this number of items

YAML File - Infrastructure

clouds:
  - ram: 32000
    cpu: 100
    hdd: 20000
    name: "wan"
  - ram: 16000
    cpu: 50
    hdd: 10000
    name: "edge"

Declare list of clouds with a

  • name
  • cpu
  • storage
  • memory

YAML File - Infrastructure

nfs:
  - name: "NF1"
    ram: 100
    cpu: 9
    hdd: 1234
  - name: "NF2"
    ram: 100
    cpu: 9
    hdd: 1234

Declare list of network functions with a

  • name
  • cpu
  • storage
  • memory

YAML File - Infrastructure

policies:
  - type: "NfMgr"
    policy: "first-available-method"
  - type: "SliceMgr"
    policy: "first-available-method"

“Plug-in” your algorithms at pre-defined hooks

  • Type
    • Specifies manager entity
  • Policy
    • Specifies type of algorithm

Extendable* by anyone!

YAML File - Slice Infrastructure

slices:
  - name : "Video Streaming"
    composition:
      - nf : "NF1"
        weight : 20
      - nf : "NF2"
        weight : 20
      - nf : "NF3"
        weight : 20
      - nf : "NF4"
        weight : 20

“Compose” a slice using a network function as an order of weights

For each slice, there is a :

  • name
  • NF composition list, where each item contains:
    • nf name
    • % of that NF, which makes up this slice

YAML File - Service Infrastructure

services:
  - name : "gold"
    composition:
      - slice : "Emergency"
        weight : 30
      - slice : "Video Streaming"
        weight : 55

“Compose” a service using one or more slices as an order of weights

For each service, there is:

  • name
  • Slice composition list, where each item contains:
    • slice name
    • % of that slice, which makes up this Service

YAML File - Slicelets

slicelets:
  - name : "slicelet1"
    service : "gold"
    duration : 60
  - name : "slicelet2"
    service : "silver"
    duration : 60
  - name : "slicelet3"
    service : "gold"
    duration : 60

Models user traffic in the form of slicelet(s)

A list containing:

  • slicelet name
  • A composition list, where each item contains:
    • service name
    • duration of usage (in secs)

YAML File - make-Slicelets 1

make-slicelets:
  count : 100 
  duration_range : 5
  service-slicelet-mapping :
    - service : 'gold'
      weight : 50 
    - service : 'silver'
      weight : 50 

Automate slicelet generation with make-slicelets

  • Total slicelets to be generated 2
  • randon duration to be assigned
  • load balancing slicelet allocation based on weightage 3

CSV file based inference

For every experiment, slicenet will generate 2 CSV files with the following format :

  • <exp name>_<exp timestamp>-slicelets.csv
  • <exp name>_<exp timestamp>-infra.csv
Epoch Name ID Admitted? Scheduled At Started At Ended At Overall Delay(sec)
0 1 slicelet-gold-0 013b5bbc-2d68-4f82-a0d0-8df5ea3dc2c1 True 2024-01-12 17:11:43 2024-01-12 17:13:21 2024-01-12 17:13:25 98.285570
1 1 slicelet-gold-1 74a45e99-e27f-46e5-bce7-8dffb726a4c1 True 2024-01-12 17:11:44 2024-01-12 17:12:14 2024-01-12 17:12:14 30.087168
2 1 slicelet-gold-2 773a51f3-ddda-4871-b1ba-87c133ff55d0 True 2024-01-12 17:11:42 2024-01-12 17:12:49 2024-01-12 17:12:49 67.212234
3 1 slicelet-gold-3 233cc127-71a2-44e6-a690-64485cd3325b True 2024-01-12 17:11:46 2024-01-12 17:13:12 2024-01-12 17:13:15 86.257871
4 1 slicelet-gold-4 9f41a5fa-267e-46f3-806e-9d140367aef5 True 2024-01-12 17:11:42 2024-01-12 17:11:58 2024-01-12 17:12:00 16.047042
Entity Name ID Admitted? Event History
0 Cloud wan 5b2a1456-0fe4-41af-a8ed-1d2c56e9f663 True {}
1 Cloud edge 83549ad8-26d6-4856-bbca-b60d20829a7c True {}
2 NFs NF1 1e4f402a-43a5-4d09-b6cd-7c1586f16413 True {}
3 NFs NF2 0b0d17af-5389-424f-b92e-4e0bd00354f5 True {}
4 NFs NF3 8ba9dce5-8bf1-4660-9c64-c7a35bf5d77f True {}

Glimpse of what you can do with the inference

Experiments Python API

1from slicenet.utils.experimentMgr import ExperimentMgr

2ctxMgr = ExperimentMgr()
1
ExperimentMgr provides all the necessary functions to load, conduct & infer experiments
2
creating an instance of ExperimentMgr class serves as a content mgr

Brand new module from slicenet package to deal with Experiments

Experiments Python API

from slicenet.utils.experimentMgr import ExperimentMgr

ctxMgr = ExperimentMgr()
1config_yamls = ['config1.yaml', 'config2.yaml']
2ctxMgr.loadExperimentsFromFiles(config_yaml)
1
load list of configuration yaml files
2
use loadExperimentsFromFiles() to load one or more experiments

loadExperimentsFromFiles can be used to load experiments from 1 or more configuration files

Experiments Python API

from slicenet.utils.experimentMgr import ExperimentMgr

ctxMgr = ExperimentMgr()
1ctxMgr.loadExperimentsFromDir(in_dir = 'path/to/dir')
1
Or from a directory containing config files 1

loadExperimentsFromDir makes it even more easy to automate experimentations 👨🏻‍💻

Experiments Python API

from slicenet.utils.experimentMgr import ExperimentMgr

ctxMgr = ExperimentMgr()
config_yamls = ['config1.yaml', 'config2.yaml']
ctxMgr.loadExperimentsFromFiles(config_yaml)
1ctxMgr.deployAndLaunch()
2ctxMgr.saveInference()
logger.info(f"Done experiment")
1
Once experiments have been loaded, deployAndLaunch() can be used to start experiments
2
saveInference() produces the *.csv files for each experiment

Experiments Python API | One more thing..

Logging support 1

import logging

# Get the base name of the script without the extension
script_name = os.path.splitext(os.path.basename(__file__))[0]

# Use the script name as the log file name
log_file_name = f"{script_name}.log"

logger = logging.getLogger(script_name)
logging.basicConfig(format='%(asctime)s.%(msecs)03d %(name)s %(module)s  \
    %(levelname)s: %(message)s', datefmt='%m/%d/%Y %I:%M:%S %p', \ 
    level=logging.INFO, filename=log_file_name)